<?php
namespace app\models;

use yii\db\ActiveRecord;

/**
 * 第三方登录
 *
 * Class UserAuth
 * @package app\models
 *
 * @property integer $id
 * @property integer $uid
 * @property string $source
 * @property string $user_id
 * @property string $content
 *
 * @property User $user 关联用户
 */
class UserAuth extends ActiveRecord
{
    /**
     * 关联用户
     * @return \yii\db\ActiveQuery
     */
    public function getUser()
    {
        return $this->hasOne(User::className(), ['id'=>'uid']);
    }
}
